from pyecharts import options as opts
from pyecharts.charts import Bar
from pyecharts.render import make_snapshot

from snapshot_phantomjs import snapshot


# def bar_chart() -> Bar:
#     # ********* Begin *********#
#     bar = (
#         Bar()
#             .add_xaxis(["Shirts", "Sweaters", "Ties", "Pants", "Windbreaker", "High-heels", "Socks"])
#             .add_yaxis("Merchant-A", [114, 55, 27, 101, 125, 27, 105])
#             .add_yaxis("Merchant-B", [57, 134, 137, 129, 145, 60, 49])
#             .set_global_opts(title_opts=opts.TitleOpts(title="Bar-TestPicture"))
#             .reversal_axis()
#             .set_series_opts(label_opts=opts.LabelOpts(position="right"))
#     )
#
#     # ********** End **********#
#     return bar

print(type([114, 55, 27, 101, 125, 27, 105]))
# make_snapshot(snapshot, bar_chart().render(), "student_answer.png")